<?php
$this->load->helper('form');
?>
<h3> Add dependency </h3>
<table>
	<tr>
		
		<td>
			<?php
			
			$options = array(
	                  'depends on'  => 'depends on',
	                  'recommands'    => 'recommands',
	                  'conflicts'    => 'conflicts'
	                );
			            
			echo form_dropdown('type-list', $options, 'depends on','id="type-list"');
			
			?>
		</td>
		
		<td>
			<?php
			
			$options = array();
			foreach ($pkgs as $value)
				$options[$value['pkg_id']] = $value['name'];
				
			echo form_dropdown('package-list', $options,'',
				'id="package-list" onChange="loadBranches($F(\'package-list\'));" onFocus="loadBranches($F(\'package-list\'));"');
			?>
		</td>
	
	
		<td id="dep-branch-list" class="form-field"></td>
	
	
		<td id="dep-version-list" class="form-field"></td>
		
		<td id="dep-add" class='form-field'>
		<?php 
			$attributes = 'relationsAddRequest('. $branch_id .', $F(\'type-list\'), $F(\'branch-list\'), $F(\'release-list\') ); return false;'; ?>
			<image id="dep-submit" src="<?= base_url();?>img/add.png" style="cursor: pointer; display: none" onclick="<?=$attributes?>" />
		</td>
	</tr>
	
</table>
